using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace LHS.Core.CaseRecord.Classes
{
    public class clsMasterData
    {
        public const String ID = "id";
        public const String VALUE = "value";
        public const String DATA_TYPE = "DataType";

        public static DataTable dtDataType
        {
            get
            {
                DataTable dtReturn = new DataTable("dtLoaiDuLieu");
                dtReturn.Columns.Add(ID, typeof(String));
                dtReturn.Columns.Add(VALUE, typeof(String));

                DataRow dr;
                dr = dtReturn.NewRow();
                dr[ID] = Convert.ToInt32(clsEnumType.DataType.TEXT);
                dr[VALUE] = "Text";
                dtReturn.Rows.Add(dr);

                dr = dtReturn.NewRow();
                dr[ID] = Convert.ToInt32(clsEnumType.DataType.NUMBER);
                dr[VALUE] = "Number";
                dtReturn.Rows.Add(dr);

                dr = dtReturn.NewRow();
                dr[ID] = Convert.ToInt32(clsEnumType.DataType.YES_NO);
                dr[VALUE] = "Yes/No";
                dtReturn.Rows.Add(dr);

                dr = dtReturn.NewRow();
                dr[ID] = Convert.ToInt32(clsEnumType.DataType.OPTION);
                dr[VALUE] = "Option";
                dtReturn.Rows.Add(dr);

                return dtReturn;
            }
        }

        public static DataTable dtControlType
        {
            get
            {
                DataTable dtReturn = new DataTable("dtLoaiControlNhapLieu");
                dtReturn.Columns.Add(ID, typeof(String));
                dtReturn.Columns.Add(VALUE, typeof(String));
                dtReturn.Columns.Add(DATA_TYPE, typeof(String));

                DataRow dr;
                dr = dtReturn.NewRow();
                dr[ID] = Convert.ToInt32(clsEnumType.ControlType.TEXTBOX);
                dr[VALUE] = "Text Box";
                dr[DATA_TYPE] = Convert.ToInt32(clsEnumType.DataType.TEXT);
                dtReturn.Rows.Add(dr);

                dr = dtReturn.NewRow();
                dr[ID] = Convert.ToInt32(clsEnumType.ControlType.TEXTAREA);
                dr[VALUE] = "Text Area";
                dr[DATA_TYPE] = Convert.ToInt32(clsEnumType.DataType.TEXT);
                dtReturn.Rows.Add(dr);

                dr = dtReturn.NewRow();
                dr[ID] = Convert.ToInt32(clsEnumType.ControlType.NUMERIC);
                dr[VALUE] = "Numeric";
                dr[DATA_TYPE] = Convert.ToInt32(clsEnumType.DataType.NUMBER);
                dtReturn.Rows.Add(dr);

                dr = dtReturn.NewRow();
                dr[ID] = Convert.ToInt32(clsEnumType.ControlType.CHECKBOX);
                dr[VALUE] = "Check Box";
                dr[DATA_TYPE] = Convert.ToInt32(clsEnumType.DataType.YES_NO);
                dtReturn.Rows.Add(dr);

                dr = dtReturn.NewRow();
                dr[ID] = Convert.ToInt32(clsEnumType.ControlType.RADIOGROUP);
                dr[VALUE] = "Radio Group";
                dr[DATA_TYPE] = Convert.ToInt32(clsEnumType.DataType.OPTION);
                dtReturn.Rows.Add(dr);

                return dtReturn;
            }
        }
    }
}
